# Contributor: Coco Liliace <coco@liliace.dev>
# Maintainer: Coco Liliace <coco@liliace.dev>
_pyname=jaraco.stream
pkgname=py3-$_pyname
pkgver=3.0.3
pkgrel=0
pkgdesc="Routines for handling streaming data, including a set of generators for loading gzip data on the fly"
url="https://github.com/jaraco/jaraco.stream"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-setuptools_scm py3-wheel"
checkdepends="py3-pytest py3-more-itertools"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/jaraco/jaraco.stream/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

_distname=".dist"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel --wheel-dir "$_distname" --output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer "$_distname"/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" "$_distname"/*.whl
}

sha512sums="
df0beb368fff8b19ec9aab79dc219941653ea81df38e55139897025857f53c9ab62735994244bbc60796a0e01fd068730d588ae07a94c13262e80634d49e59e4  py3-jaraco.stream-3.0.3.tar.gz
"
